
package com.be.beadmin.basicData.repository;

import com.be.beadmin.basicData.entity.Menu;
import com.be.beadmin.basicData.entity.Organization;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;

import java.util.List;

/**
* @author chenwei
* @date 2023-04-18
**/
public interface OrganizationRepository extends JpaRepository<Organization, String>, JpaSpecificationExecutor<Organization> {

    Organization findOrganizationByIdAndDelete(String id, Integer delete);


    Organization findByOrgCodeAndDelete(String code, Integer delete);

    Organization findOrganizationById(String id);

    //获取树的顶部结构
    List<Organization> findOrganizationsByDeleteAndParentOrg(Integer isDelete, Organization org);

}